Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

It is working according to spec.
~Umberto Nongeroson 24.Oct.02 05:46 PM a Web browser
Applications Development 6.0 All Platforms


Section "5.2 - Namespace Defaulting" of the XML Namespaces spec (http://www.w3.org/TR/REC-xml-names) states:
    A default namespace is considered to apply to the element where it is declared (if that element has no namespace prefix), and to all elements with no prefix within the content of that element. If the URI reference in a default namespace declaration is empty, then unprefixed elements in the scope of the declaration are not considered to be in any namespace. Note that default namespaces do not apply directly to attributes

I underlined the last sentence to highlight its significance as the key point here.

So, what does this mean? The database element in your dxl has xmlns='http://www.lotus.com/dxl' as an attribute, and so the database element itself (because it is not explicitly qualified) and all its subelements that are not explicitly qualified or overridden by another xmlns="..." attribute (ie, all elements of the dxl in this case) have names that belong to the "http://www.lotus.com" namespace by default, but none of the attributes belong to that namespace. The attributes, instead, belong to NO namespace, which is often thought of as a namespace with a null string for a name.

For example, the following item element in the dxl ...
    <item name='Title'><text>Title</text></item>

... would be interpreted by a parser as ...
    <dxl:item name='Title'><dxl:text>Title</text></item>

... and specifically NOT as ...
    <dxl:item dxl:name='Title'><dxl:text>Title</text></item>

... because attributes do not inherit namespaces as do elements. So when your stylesheet tries to match "@dxl:name='Title'" for example, it won't find a match because the attribute in the dxl is simply "name" and not "dxl:name".

To fix this, remove the "dxl:" from the parameter expressions in your select statements. Here is the relevant part with appropriate strike-throughs:

<xsl:template match="dxl:document">
<TR>
<TD border="0">
<A>
<xsl:attribute name="href">
<xsl:value-of select="dxl:item[@dxl:name='Link']/dxl:text"/>
</xsl:attribute>
<xsl:value-of select="dxl:item[@dxl:name='Title']/dxl:text"/><BR/>
</A>
<xsl:value-of select="dxl:item[@dxl:name='Description']/dxl:text"/>
</TD>
</TR>
</xsl:template>





XSLT Transformations of Notes 6 DXL... (~Lex Kihipitex 24.Oct.02)
. . RE: XSLT Transformations of Notes 6... (~Justin Quetjip... 24.Oct.02)
. . XML namespaces FAQ (~Lex Ekweberg 24.Oct.02)
. . It is working according to spec. (~Olga Kikrotern... 24.Oct.02)
. . . . RE: It is working according to spec... (~Ethan Zenfreet... 10.Dec.02)
. . . . Ok, that works but Default Namespac... (~Lex Kihipitex 25.Oct.02)
. . . . . . Setting xmlns="http://www.lotus.com... (~Olga Kikrotern... 29.Oct.02)
. . . . . . . . But may-be xmlns and xmlns:dxl? (~Delores Zenkro... 15.Nov.03)
. . RE: XSLT Transformations of Notes 6... (~Autumn Rejipyp... 24.Oct.02)
. . RE: XSLT Transformations of Notes 6... (~Yentl Rekrovit... 24.Oct.02)
. . . . RE: XSLT Transformations of Notes 6... (~Justin Quetjip... 24.Oct.02)
. . Working Version of XSLT Transformat... (~Lex Kihipitex 25.Oct.02)
. . . . Glenn, I said the same thing about ... (~Justin Quetjip... 25.Oct.02)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS